package com.gaogzhen.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gaogzhen.domain.UserAuthInfo;
import com.gaogzhen.mapper.UserAuthInfoMapper;
import com.gaogzhen.service.UserAuthInfoService;
/**
* @description ${description}
* @author Administrator
* @date 2022-06-07 11:46
* @version 1.0
*/
@Service
public class UserAuthInfoServiceImpl extends ServiceImpl<UserAuthInfoMapper, UserAuthInfo> implements UserAuthInfoService{

    @Override
    public List<UserAuthInfo> getList(Long id, Long authCode) {
        return list(Wrappers.lambdaQuery(UserAuthInfo.class)
                .eq(ObjectUtils.isNotEmpty(id), UserAuthInfo::getUserId, id)
                .eq(ObjectUtils.isNotEmpty(authCode), UserAuthInfo::getAuthCode, authCode)
                .orderByDesc(UserAuthInfo::getLastUpdateTime)
        );
    }
}
